QStringLiteral->QLatin1String... in files I didn't even mean to
authorRobert Lipe <robertlipe@gpsbabel.org>
Mon, 4 Dec 2017 19:01:55 +0000 (13:01 -0600)
committerRobert Lipe <robertlipe@gpsbabel.org>
Mon, 4 Dec 2017 19:01:55 +0000 (13:01 -0600)
check in. (I think I've recycled an old branch name with dangling changes.)

gpx.cc
magproto.cc
unicsv.cc

diff --git a/gpx.cc b/gpx.cc
index 36701e52aab53b884ca40aa795065be34c029108..0df7033b77fbe6bbf8d8e1bd9b87b60e07f093a3 100644 (file)
--- a/gpx.cc
+++ b/gpx.cc
@@ -494,7 +494,7 @@ tag_cache_desc(const QXmlStreamAttributes& attr)
 {
   cache_descr_is_html = 0;
   if (attr.hasAttribute("html")) {
-    if (attr.value("html").toString() == QStringLiteral("True")) {
+    if (attr.value("html").toString() == QLatin1String("True")) {
       cache_descr_is_html = 1;
     }
   }
@@ -509,16 +509,16 @@ tag_gs_cache(const QXmlStreamAttributes& attr)
     gc_data->id = attr.value("id").toString().toInt();
   }
   if (attr.hasAttribute("available")) {
-    if (attr.value("available").toString().compare(QStringLiteral("True"), Qt::CaseInsensitive) == 0) {
+    if (attr.value("available").toString().compare(QLatin1String("True"), Qt::CaseInsensitive) == 0) {
       gc_data->is_available = status_true;
-    } else if (attr.value("available").toString().compare(QStringLiteral("False"), Qt::CaseInsensitive) == 0) {
+    } else if (attr.value("available").toString().compare(QLatin1String("False"), Qt::CaseInsensitive) == 0) {
       gc_data->is_available = status_false;
     }
   }
   if (attr.hasAttribute("archived")) {
-    if (attr.value("archived").toString().compare(QStringLiteral("True"), Qt::CaseInsensitive) == 0) {
+    if (attr.value("archived").toString().compare(QLatin1String("True"), Qt::CaseInsensitive) == 0) {
       gc_data->is_archived = status_true;
-    } else if (attr.value("archived").toString().compare(QStringLiteral("False"), Qt::CaseInsensitive) == 0) {
+    } else if (attr.value("archived").toString().compare(QLatin1String("False"), Qt::CaseInsensitive) == 0) {
       gc_data->is_archived = status_false;
     }
   }
@@ -972,7 +972,7 @@ gpx_end(const QString& el)
      * last date we saw in this log.
      */
   case tt_cache_log_type:
-    if ((cdatastr.compare(QStringLiteral("Found it")) == 0) &&
+    if ((cdatastr.compare(QLatin1String("Found it")) == 0) &&
         (0 == wpt_tmp->gc_data->last_found.toTime_t())) {
       wpt_tmp->AllocGCData()->last_found = gc_log_date;
     }
@@ -1423,7 +1423,7 @@ fprint_xml_chain(xml_tag* tag, const Waypoint* wpt)
         fprint_xml_chain(tag->child, wpt);
       }
       if (wpt && wpt->gc_data->exported.isValid() &&
-          tag->tagname.compare(QStringLiteral("groundspeak:cache")) == 0) {
+          tag->tagname.compare(QLatin1String("groundspeak:cache")) == 0) {
         writer->writeTextElement("time",
                                  wpt->gc_data->exported.toPrettyString());
       }
index 0deb7f33605dfc53132031626a05caceca9a6933..7144999b5337d0e127192aa2d1fb374135a0a049 100644 (file)
@@ -819,11 +819,11 @@ mag_rd_init_common(const QString& portname)
    */
   QString exten = QFileInfo(curfname).suffix();
   if (exten.length() > 0) {
-    if (0 == exten.compare(QStringLiteral("upt"), Qt::CaseInsensitive)) {
+    if (0 == exten.compare(QLatin1String("upt"), Qt::CaseInsensitive)) {
       extension_hint = WPTDATAMASK;
-    } else if (0 == exten.compare(QStringLiteral("log"), Qt::CaseInsensitive)) {
+    } else if (0 == exten.compare(QLatin1String("log"), Qt::CaseInsensitive)) {
       extension_hint = TRKDATAMASK;
-    } else if (0 == exten.compare(QStringLiteral("rte"), Qt::CaseInsensitive)) {
+    } else if (0 == exten.compare(QLatin1String("rte"), Qt::CaseInsensitive)) {
       extension_hint = RTEDATAMASK;
     }
   }
index 6312e9d27b11d3a18fdac0fca1fe10845ef780ab..f2dd0d910452beb5fbcd91e227d7ea70bbc917f9 100644 (file)
--- a/unicsv.cc
+++ b/unicsv.cc
@@ -430,13 +430,13 @@ unicsv_parse_time(const QString& str, int* msec, time_t* date)
 static status_type
 unicsv_parse_status(const QString& str)
 {
-  if (str.compare(QStringLiteral("true"), Qt::CaseInsensitive) == 0 ||
-      str.compare(QStringLiteral("yes"), Qt::CaseInsensitive) == 0 ||
+  if (str.compare(QLatin1String("true"), Qt::CaseInsensitive) == 0 ||
+      str.compare(QLatin1String("yes"), Qt::CaseInsensitive) == 0 ||
       str == "1") {
     return status_true;
   }
-  if (str.compare(QStringLiteral("false"), Qt::CaseInsensitive) == 0 ||
-      str.compare(QStringLiteral("no"), Qt::CaseInsensitive) == 0 ||
+  if (str.compare(QLatin1String("false"), Qt::CaseInsensitive) == 0 ||
+      str.compare(QLatin1String("no"), Qt::CaseInsensitive) == 0 ||
       str == "0") {
     return status_false;
   }